#pragma once
#include "MyRuleStruct.h"
class BaseDialog;

class File
{
public:
	File();
	~File();
public:
	PATH_NODE m_path_node;
	CStdString m_cstrDeletFile;
private:
	BOOL m_bIs_in_list;
private:
	static unsigned int __stdcall RunStartFileMonitor(void *lpParam);
	static unsigned int __stdcall RunStartFileMonitorCancel(void *lpParam);

	static unsigned int __stdcall RunAddMonitorFile(void *lpParam);
	static unsigned int __stdcall RunDelMonitorFile(void *lpParam);
	static unsigned int __stdcall RunDelFile(void *lpParam);
	static unsigned int __stdcall RunDelDir(void *lpParam);

	void FileMonitor(BaseDialog *pBaseDlg);
	void FileMonitorCancel(BaseDialog *pBaseDlg);
	BOOL AddMonitorFile(BaseDialog *pBaseDlg);
	BOOL DelMonitorFile(BaseDialog *pBaseDlg);
	void DelFile(BaseDialog *pBaseDlg);
	void DelDir(BaseDialog *pBaseDlg);

public:
	BOOL StartDelMonitorFile(BaseDialog *pBaseDlg);
	BOOL StartAddMonitorFile(BaseDialog *pBaseDlg);
	BOOL StartFileMonitor(BaseDialog *pBaseDlg);
	BOOL StartFileMonitorCancel(BaseDialog *pBaseDlg);
	WhatTodo FileNotifyFunc(Param& op);
	void MyDelFile(BOOL bStrong, PWCHAR pPath, BaseDialog *pBaseDlg);
	BOOL DeleteDirectory(LPCTSTR lpszDir);
	BOOL StartDelFile(BaseDialog *pBaseDlg);
	BOOL StartDelDir(BaseDialog *pBaseDlg);


	
};

